/**
 * 
 */
package com.obradovicnjegovan.webprodavnica.pages.admin;

import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.hibernate.annotations.CommitAfter;
import org.apache.tapestry5.ioc.annotations.Inject;

import com.obradovicnjegovan.webprodavnica.controller.ControllerAL;
import com.obradovicnjegovan.webprodavnica.entities.Narudzbenica;

/**
 * @author njegovan
 *
 */
public class NovaNarudzbenica {
	@Property
	private Narudzbenica novaNarudzbenica;
	@Inject
	private ControllerAL controllerAL;
	
	@CommitAfter
	private Object onSuccess(){
		controllerAL.sacuvajNarudzbenicu(novaNarudzbenica);
		return Index.class;
	}

}